<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => {
    assert_not_equals(window.eventSender, undefined,
        'This test requires window.eventSender');
    assert_not_equals(window.internals, undefined,
        'This test requires window.internals');
    ['mac', 'win', 'unix', 'android'].forEach(platform =>
        assert_selection(
            '<div contenteditable>\u0E27\u0E31|</div>',
            selection => {
                internals.settings.setEditingBehavior(platform);
                selection.document.defaultView.focus();
                eventSender.keyDown('Backspace', null);
                selection.document.execCommand('undo');
            },
            '<div contenteditable>\u0E27\u0E31|</div>',
            `${platform}: Undo of backspace key on ligature U+0E27 and U+0E31`));
});
</script>
